<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:mo="https://gitee.com/aun/Timo">
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})">
</head>
<body class="timo-layout-page">
    <div class="layui-card">
        <div class="layui-card-header timo-card-header">
            <span><i class="fa fa-bars"></i> 加班申请审批</span>
            <i class="layui-icon layui-icon-refresh refresh-btn"></i>
        </div>
        <div class="layui-card-body">

                      <div class="timo-table-wrap">
                <table class="layui-table timo-table">
                    <thead>
                    <tr>
                        <th class="timo-table-checkbox">
                            <label class="timo-checkbox"><input type="checkbox">
                                <i class="layui-icon layui-icon-ok"></i></label>
                        </th>
                        <th>申请人</th>
                        <th>加班开始时间</th>
                        <th>加班结束时间</th>
                        <th>加班备注</th>
                        <th>审批用户</th>
                        <th>审批状态</th>
                        <th>操作</th>

                    </tr>
                    </thead>
                    <tbody>
                    <tr th:each="item:${list}">
                        <td><label class="timo-checkbox"><input type="checkbox" th:value="${item.id}">
                            <i class="layui-icon layui-icon-ok"></i></label></td>
                        <td th:text="${item.userName}">申请人</td>
                        <td th:text="${item.startTime}">加班开始时间</td>
                        <td th:text="${item.endTime}">加班结束时间</td>
                        <td th:text="${item.remark}">加班备注</td>
                        <td th:text="${item.auditorName}">审批用户</td>
                        <td th:text="${item.status}">审批状态</td>
                        <td>
                            <a class="ajax-get" th:attr="data-msg='是否同意'"
                               th:href="@{'/business/attendanceApply/audit/' + ${item.taskId} + '/1'}">同意</a>
                            <a class="ajax-get" th:attr="data-msg='是否不同意'"
                               th:href="@{'/business/attendanceApply/audit/' + ${item.taskId} + '/-1'}">不同意</a>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div th:replace="/common/my_fragment :: page"></div>
        </div>
    </div>
<script th:replace="/common/template :: script"></script>
    <script>
        layui.use(['element','laydate','form'], function () {
            var $ = layui.jquery;
            var dv = $(".dict-value");
            $(window).on("resize", function () {
                var width = $("body").width();
                if (width > 1200) {
                    dv.css("max-width", width * 0.32);
                } else {
                    dv.css("max-width", width * 0.20);
                }
            }).resize();
                 });
    </script>
</body>
</html>